package cn.com.huzo.model.entities.purchase;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 物料采购合同主记录实体类
 * <p>
 * @author 吴旭
 */
public class PoLinesMrpEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 3241972379415494671L;
    private String LinesId;
    private Long HeaderId;
    private Long MrpHeaderId;     // 物料需求计划Id
    private String MrpTypeName;   // 单据类型
    private String ContractNo;
    private String StyleNo;
    private String ProductName;

    public String getLinesId() {
        return LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public Long getMrpHeaderId() {
        return MrpHeaderId;
    }

    public String getMrpTypeName() {
        return MrpTypeName;
    }

    public void setMrpTypeName(String MrpTypeName) {
        this.MrpTypeName = MrpTypeName;
    }

    public String getContractNo() {
        return ContractNo;
    }

    public void setContractNo(String ContractNo) {
        this.ContractNo = ContractNo;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public void setMrpHeaderId(Long MrpHeaderId) {
        this.MrpHeaderId = MrpHeaderId;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PoLinesMrpEntity)) {
            return false;
        }

        final PoLinesMrpEntity that = (PoLinesMrpEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
